<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title></title>
<script type="text/javascript">
	window.onload = function() {
		document.getElementById("anImage").onclick
			= 	function(event) {
					if(!event) event = window.event;
					var target = event.target ? event.target : event.srcElement;
					document.getElementById("info").innerHTML += "Woof at " + target.id + "<br/>";
				};
	};
</script>
</head>
<body>

	<img src="" id="anImage" width="200" height="20"/>
	
	<div id="info"></div>
	
	
</body>
</html>